//1.for循环数组
let arr = [1, 2, 3]
for (let i = 0; i < arr.length; i++) {
	console.log(arr[i])
}


//2.foreach()遍历数组
let arr2 = [4, 5, 6]
arr.forEach(function (item, index, arr2) {
	console.log(item, index)
})


//3.map()遍历数组
let arr3 = [11, 23, 69]
let result = arr3.map(function (value) {
	value += 1
	return value
})
console.log(arr3, result)


//4.find()
let arr4 = [1,2,3,4,5,6]
let res = arr4.find(function (value) {
	return value === 2
})
console.log(res, arr4)